package com.xhorse.lockplatform.comm.util;

/**
 * 二元组
 *
 * @param <T>
 * @param <K>
 * @author Stay
 */
public class Tuple<T, K> {
    public T first;
    public K second;

    public Tuple(T first, K second) {
        this.first = first;
        this.second = second;
    }

    public static <T, K> Tuple<T, K> valueOf(T first, K second) {
        return new Tuple<>(first, second);
    }

    public T getFirst() {
        return first;
    }

    public void setFirst(T first) {
        this.first = first;
    }

    public K getSecond() {
        return second;
    }

    public void setSecond(K second) {
        this.second = second;
    }

    @Override
    public String toString() {
        return "Tuple{" +
                "first=" + first +
                ", second=" + second +
                '}';
    }
}
